package com.zy.pigchat_server.controller;

import com.zy.pigchat_server.annotation.HasRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 这是那头猪？
 * @version 1.0
 * @description:
 * @date 2023/7/21 17:25
 */
@Api(tags = "测式接口")
@RestController
public class textController {

    @HasRole(role = "text")
    @ApiOperation(value = "接口测试1")
    @GetMapping("/text1")
    public String text1(){
        return "text1";
    }

    @HasRole(role = "admin")
    @ApiOperation(value = "接口测试2")
    @GetMapping("/text2")
    public String text2(){
        return "text2";
    }

}
